export default function (el: any, width: number, height: number) {
  // 判断当前屏幕是否横屏
  if (window.orientation == null || window.orientation === 180 || window.orientation === 0) {
    // 竖屏状态则旋转容器，并让高等于宽，宽等于高
    el.style.webkitTransform = el.style.transform = `rotate(90deg)`;
    el.style.width = `${height}px`;
    el.style.height = `${width}px`;
    el.style.webkitTransformOrigin = el.style.transformOrigin = `${width / 2}px center`;
  } else if (window.orientation === 90 || window.orientation === -90) {
    el.style.webkitTransform = el.style.transform = `rotate(0)`;
    el.style.width = `${width}px`;
    el.style.height = `${height}px`;
  }
  // window.addEventListener('resize', () => {
  //   console.log('屏幕变化');
  //   window.location.reload();
  // });
}
